﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Catering.View_Operaction;
using System.Data;
using Microsoft.Reporting.WebForms;

namespace Catering.Catering_Page.Kufang
{
    public partial class HallYearAtePage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            View_Monitor vm = new View_Monitor();
            string OAREAID = DDLTool1.GetDDL_Area();
            string CLASSID = DDLTool1.GetDDL_Class();
            string year = DDLTool1.GetYear();
            if (string.IsNullOrEmpty(year))
            {
                return;
            }
            DateTime DTIME = DateTime.Parse(DDLTool1.GetYear() + "-01-01 00:00:11");
            string Title = Bind_Data_to_Controls.Bind_ReportTitle(OAREAID, CLASSID, DTIME, "食品费用汇总");
            DataTable dt = vm.GetHallYearAte(OAREAID, CLASSID, DTIME, Title);
            ReportDataSource rds = new ReportDataSource("DataSet1", dt);
            ReportViewer1.LocalReport.DataSources.Clear();
            ReportViewer1.LocalReport.DataSources.Add(rds);
            ReportViewer1.LocalReport.Refresh();
            ReportViewer1.Visible = true;
        }
    }
}